
function foo() {
    # 注释这一句，bar 中的 i 会被修改
    local i
    i="z"
    # unset i
}

function bar() {
    # local: can only be used in a functio
    local i
    for i in {0..4}; do
        foo
        echo "i=$i"
    done
}

bar
